<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
//闭包
(function(){
    var a='a';
    console.log(a)
    //封装
    window.meA =a;
})();

(function(){
    console.log(window.meA)
})()
</script>
</body>
</html>